package top.lingkang.potatoserver.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.lingkang.potatoserver.entity.User;
import top.lingkang.potatoserver.mapper.UserMapper;
import top.lingkang.potatoserver.service.UserService;

/**
 * @author lingkang
 * @date 2021/9/19 0:47
 * @description
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUser(String username) {
        return userMapper.get(username);
    }

    @Override
    public User getUserById(Integer id) {
        return userMapper.getById(id);
    }
}
